<template>
	<div class="header">
		<div class="company">唐山机器人共享制造公共服务平台</div>

		<div style="display: flex;align-items: center;">
			<div style="display: flex;font-size: 15px;margin-right: 20px;" v-if="$store.state.userType==4">
				<div style="padding-right: 20px;border-right: 1px solid #D3D8E0;">总额度（元）：{{$store.state.total_num}}</div>
				<div style="padding-left: 20px;">剩余额度（元）：{{$store.state.shengyu}}</div>
			</div>
			<el-dropdown>
				<span class="el-dropdown-link">
					<div class="demo-type">
						<div>
							<el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png">
							</el-avatar>
						</div>
					</div>
				</span>
				<el-dropdown-menu slot="dropdown">
					<!-- <el-dropdown-item icon="el-icon-edit" command="个人信息">个人信息</el-dropdown-item> -->
					<el-dropdown-item icon="el-icon-s-operation" command="欢迎下来光临！"
						@click.native="quitLogin()">退出登录</el-dropdown-item>
				</el-dropdown-menu>
			</el-dropdown>
		</div>
	</div>
</template>

<script>
	import {
		removeToken
	} from '@/utils/auth.js'
	export default {
		data() {
			return {
			}
		},
		created(){
			console.log()
		},
		methods: {
			quitLogin() {
				removeToken()
				this.$router.push({
					path: '/login'
				})
			}
		},
	}
</script>
<style scoped lang="scss">
	.header {
		height: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 25px;

		.company {
			height: 100%;
			display: flex;
			align-items: center;
			font-weight: 500;
			font-size: 17px;
			color: #333333;
			font-style: normal;
		}
	}
</style>